package com.uphone.edwards.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.uphone.edwards.R;
import com.uphone.edwards.modle.AddressBean;

public class AddressAdapter extends MybaseAdapter<String> {
    public AddressAdapter(Context context) {
        super(context);
    }

    @Override
    public View setView(int position, View converView, ViewGroup parent) {
        final ViewHolder holderView;
        if (converView == null) {
            converView = inflater.inflate(R.layout.item_address, null);
            holderView = new ViewHolder(converView);
            converView.setTag(holderView);
        } else {
            holderView = (ViewHolder) converView.getTag();
        }
        String item = getItem(position);
        holderView.tvAddress.setText(item);

        return converView;
    }
    class ViewHolder{
        private TextView tvAddress;
        public ViewHolder(View v){
            tvAddress = v.findViewById(R.id.tv_address);
        }
    }
}

